<template>
  <div id="user_mine">
    <p>{{fullName}}</p>
  </div>
</template>

<script>
  export default {
    name: "user_group",
    data(){
      return{
        resData:'',
        firstName:'Lu',
        lastName:'Han',
      }
    },
    computed:{
      // 计算属性实现输出全名
      fullName: {
        get:function () {
          return this.firstName+" "+this.lastName;
        },
        set:function (value) {
          this.firstName=value.split(" ")[0];
          this.lastName=value.split(" ")[1];
        }
      }
    },
    mounted(){
      this.$http.get('http://www.gqluck.com/index/index/getList').then(
        response=>{
          console.log(response);
          this.resData=response.body.data.group;
          console.log(this.resData);
        }
      )
    },
  }
</script>

<style scoped>

</style>
